const fs = require('fs');
const path = require('path');
fs.exists('abc.txt',function (exists) {
    if(!exists){
        fs.writeFile(path.join(__dirname,'abc.txt'),'test','utf8',function (err) {
            if(err){
                console.log(err);
            }else {
                console.log('写入成功')
            }
        })
    }
});